package com.erp.comm;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class TreeNode {

    private Integer id;
    private String title;
    private  String href;
    private Boolean spread;


    private List<TreeNode > children = new ArrayList<>();

    private  String checkArr;
    private  String icon;
    @JsonProperty("parentId")
    private  Integer pid;


    public TreeNode(Integer id, String title, String href, Boolean spread, String icon, Integer pid) {
        this.id = id;
        this.title = title;
        this.href = href;
        this.spread = spread;
        this.icon = icon;
        this.pid = pid;
    }

    public TreeNode(Integer id, String title,  Boolean spread, String checkArr, Integer pid) {
        this.id = id;
        this.title = title;
        this.spread = spread;
        this.checkArr = checkArr;
        this.pid = pid;
    }



}



